package main

import "fmt"

func calc(index string, a int, b int) int {
	ret := a + b
	fmt.Printf("calc|index=%v|a=%v|b=%v|ret=%v\n", index, a, b, ret)

	return ret
}

func main() {
	a := 1
	b := 2

	// defer calc("t1", a, b)
	// defer calc("t2", a, calc("t2-1", a, b))

	defer calc("t1", a, calc("t1-1", a, b))

	fmt.Printf("111111\n")
	a = 0

	defer calc("t2", a, calc("t2-2", a, b))
	fmt.Printf("22222222\n")

	// b = 1
}
